<?php
# include database-config-file
if( file_exists( "config.php" ) ){
	require_once( "config.php" );
	if(@($db_server=="")||@($db_name=="")||@($db_user=="")||@($db_password=="")){
		echo "<p class=\"red\">Your configuration is damaged. Please check the file /config.php if you have all fields filled properly. To reinstall (all current data will be lost) start the <a href=\"/install.php\">installation</a> again.</p>";
		exit;
	}
} else {
	echo "<p class=\"red\">Configuration could not be loaded. If you haven't configured it yet, you can now <a href=\"/install.php\">install this application</a>.</p>";
	exit;
}

/*  CONNECT TO DATABASE
    ============================================================================================================== */
	$db          = mysql_connect( $db_server, $db_user, $db_password ) or die ( "ERROR! Connection to database could not be etablished!" );
	$db_check    = mysql_select_db( $db_name );
	mysql_query("SET NAMES utf8");

?>